home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / Snippets / Testing & Debugging / Audit / Src / DisplayAudit.r < prev    next >
Encoding:
Text File  |  1993-07-21  |  7.1 KB  |  303 lines  |  [TEXT/KAHL]

  1. /*                                    DisplayAudit.r                                */
  2. /*
  3.  * Display Audit
  4.  * DisplayAudit.r
  5.  * Copyright © 1993 Apple Computer Inc. All rights reserved.
  6.  * These are the resource definitions for Display Audit. This file can be compiled
  7.  * by MPW Rez and by Think C 6.0 Rez.
  8.  */
  9. #include "Types.r"
  10. #include "SysTypes.r"
  11. #include "DisplayAudit.h"
  12. #ifndef THINK_Rez
  13. include "::Display Audit Icons.rsrc";
  14. #endif
  15.  
  16. type 'MAM1' as 'STR ';
  17. resource 'MAM1' (0, "Owner Resource", purgeable) {
  18.     "Audit Display Application."
  19.     " Copyright © 1992-93 Apple Computer Inc. All Rights Reserved."
  20. };
  21.  
  22. resource 'vers' (1) {
  23.     0x1,
  24.     0x0,
  25.     release,
  26.     0x0,
  27.     verUS,
  28.     "1.0",
  29.     "1.0 © 1993 Apple Computer Inc. All Rights Reserved"
  30. };
  31.  
  32. resource 'vers' (2) {
  33.     0x1,
  34.     0x0,
  35.     release,
  36.     0x0,
  37.     verUS,
  38.     "1.0",
  39.     "For AOCE 1.0"
  40. };
  41.  
  42. resource 'STR#' (STRN_Messages, "Error messages", purgeable) {
  43.     {
  44.         "Can't initialize application - fatal",
  45.         "No memory",
  46.         "Can't create audit record - fatal",
  47.         "Can't create display window",
  48.         /*
  49.          * Preference file errors
  50.          */
  51.         "Wrong system version: cannot create preference file",
  52.         "Can't find Preference folder in System folder",
  53.         "Can't find Preference file",
  54.         "Can't open Preference file",
  55.         "Can't create Preference file",
  56.         "Can't write Preference information",
  57.         "Can't read Preference information",
  58.         /*
  59.          * Log file errors
  60.          */
  61.         "Can't create output file",
  62.         "Can't write ouput file",
  63.         "Can't close output file"
  64.     }
  65. };
  66.  
  67. resource 'STR#' (STRN_Strings, "Random strings", purgeable) {
  68.     {
  69.         "DisplayAudit Preferences",
  70.     }
  71. };
  72.  
  73. resource 'STR ' (STR_FinderString, "Finder Info for Pref File", purgeable) {
  74.         "This document describes user preferences for the DisplayAudit"
  75.         " application. It cannot be opened or printed."
  76.         " To be effective, this document must be stored in the Preferences"
  77.         " folder inside the System Folder."
  78. };
  79.  
  80. resource 'MBAR' (MBAR_MenuBar) {
  81.     {
  82.         MENU_Apple,
  83.         MENU_File,
  84.         MENU_Edit
  85.     }
  86. };
  87.  
  88. resource 'MENU' (MENU_Apple, "Apple Menu") {
  89.     MENU_Apple,
  90.     textMenuProc,
  91.     0x0,
  92.     enabled,
  93.     apple,
  94.     {
  95.         "Copyright © 1992-93 Apple Computer Inc.", noIcon, noKey, noMark, plain,
  96.         "-", noIcon, noKey, noMark, plain
  97.     }
  98. };
  99.  
  100. resource 'MENU' (MENU_File, "File Menu") {
  101.     MENU_File,
  102.     textMenuProc,
  103.     0x0,
  104.     enabled,
  105.     "File",
  106.     {
  107.         "New Display Window", noIcon, "N", noMark, plain,
  108.         "Close Window", noIcon, "W", noMark, plain,
  109.         "-", noIcon, noKey, noMark, plain,
  110.         "Save As…", noIcon, "S", noMark, plain,
  111.         "Close File", noIcon, "S", noMark, plain,
  112.         "-", noIcon, noKey, noMark, plain,
  113.         "Quit", noIcon, "Q", noMark, plain
  114.     }
  115. };
  116.  
  117. resource 'MENU' (MENU_Edit, "Edit Menu") {
  118.     MENU_Edit,
  119.     textMenuProc,
  120.     0x0,
  121.     enabled,
  122.     "Edit",
  123.     {    /* array: 6 elements */
  124.         "Undo", noIcon, "Z", noMark, plain,
  125.         "-", noIcon, noKey, noMark, plain,
  126.         "Cut", noIcon, "X", noMark, plain,
  127.         "Copy", noIcon, "C", noMark, plain,
  128.         "Paste", noIcon, "V", noMark, plain,
  129.         "Clear", noIcon, noKey, noMark, plain
  130.     }
  131. };
  132.     
  133. resource 'WIND' (WIND_Document, "Main Window") {
  134.         { 0, 0, kMinWindowHeight, kMinWindowWidth },
  135.         zoomDocProc,
  136.         invisible,
  137.         goAway,
  138.         0x0,
  139.         "Display Audit - XXXX"    /* XXXX will be replaced by the Audit ID        */
  140. };
  141.  
  142. resource 'DLOG' (DLOG_SFPutFile, "Audit File Dialog", purgeable) {
  143.         {   0,   0, 344, 312 },
  144.         dBoxProc,
  145.         invisible,
  146.         noGoAway,
  147.         0,
  148.         DLOG_SFPutFile,
  149.         ""
  150. };
  151.  
  152. resource 'DITL' (DLOG_SFPutFile, "Audit File Dialog", preload, purgeable) {
  153.     {
  154.         { 190, 218, 208, 298 },    Button        { enabled, "Save"                    },
  155.         { 218, 218, 236, 298 },    Button        { enabled, "Don’t Save"                },
  156.         { 136,  14, 152, 197 },    StaticText    { disabled, "Save As:"                },
  157.         {  29, 200,  49, 302 }, UserItem    { enabled                            },
  158.         {  56, 218,  74, 288 }, Button        { enabled, "Eject"                    },
  159.         {  82, 218, 100, 288 }, Button        { enabled, "Drive"                    },
  160.         { 157,  17, 173, 194 }, EditText    { enabled, ""                        },
  161.         {  29,  14, 127, 197 }, UserItem    { enabled                            },
  162.         /*
  163.          * Added items
  164.          */
  165.         { 192,  17, 208,  69 }, EditText    { enabled, ""    /* Selector */        },
  166.         { 192,  74, 208, 176 },    StaticText    { disabled, "Audit Selector"        },
  167.         { 218,  17, 234,  69 }, EditText    { enabled, ""                        },
  168.         { 218,  74, 234, 186 }, StaticText    { disabled, "Audit Records"            },
  169.         { 244,  17, 260,  69 }, EditText    { enabled, ""                        },
  170.         { 244,  74, 260, 186 }, StaticText    { disabled, "Display Lines"            },
  171.         { 270,  15, 288, 194 }, CheckBox    { enabled, "Enable Audit Logging"    },
  172. #define kFontPopupRect        { 294,  15, 313, 216 }
  173.         kFontPopupRect,            Control        { enabled, CNTL_FontPopup            },
  174. #define kFontSizePopupRect    { 316,  15, 337, 188 }
  175.         kFontSizePopupRect,        Control        { enabled, CNTL_SizePopup            },
  176.     }
  177. };
  178.  
  179. resource 'CNTL' (CNTL_FontPopup, preload, purgeable) {
  180.     kFontPopupRect,                        /* Must match DITL above            */
  181.     popupTitleLeftJust,                    /* Left-justify                        */
  182.     visible,
  183.     41,                                    /* Title width                        */
  184.     MENU_Font,                            /* Font menu                        */
  185.     popupMenuCDEFProc,                    /* It's a popup menu                */
  186.     0,                                    /* refCon, unused                    */
  187.     "Fonts:"                            /* Title                            */
  188. };
  189.  
  190. resource 'MENU' (MENU_Font, "Font Menu") {
  191.     MENU_Font,
  192.     textMenuProc,
  193.     allEnabled,
  194.     enabled,
  195.     "Fonts",
  196.     { }
  197. };
  198.  
  199. resource 'CNTL' (CNTL_SizePopup, preload, purgeable) {
  200.     kFontSizePopupRect,                    /* Must match DITL above            */
  201.     popupTitleLeftJust | popupFixedWidth, /* Left-justify                    */
  202.     visible,
  203.     41,                                    /* Title width                        */
  204.     MENU_FontSize,                        /* Font Size menu                    */
  205.     popupMenuCDEFProc,                    /* It's a popup menu                */
  206.     0,                                    /* refCon, unused                    */
  207.     "Size:"                                /* Title                            */
  208. };
  209.  
  210. resource 'MENU' (MENU_FontSize, "Font Size Menu") {
  211.     MENU_FontSize,
  212.     textMenuProc,
  213.     allEnabled,
  214.     enabled,
  215.     "Size",
  216.     {
  217.         "9", noIcon, noKey, noMark, plain,
  218.         "10", noIcon, noKey, noMark, plain,
  219.         "12", noIcon, noKey, noMark, plain,
  220.         "14", noIcon, noKey, noMark, plain,
  221.         "16", noIcon, noKey, noMark, plain,
  222.         "18", noIcon, noKey, noMark, plain,
  223.         "24", noIcon, noKey, noMark, plain,
  224.         "36", noIcon, noKey, noMark, plain,
  225.     }
  226. };
  227.  
  228. resource 'ALRT' (ALRT_NonFatal, "System Error", purgeable) {
  229.     {100, 80, 230, 422},
  230.     ALRT_NonFatal,
  231.     {
  232.         OK, visible, silent,
  233.         OK, visible, silent,
  234.         OK, visible, silent,
  235.         OK, visible, silent
  236.     }
  237. };
  238.  
  239. resource 'DITL' (ALRT_NonFatal, "System Error", purgeable) {
  240.     {
  241.         {100, 220, 120, 322}, Button        { enabled,    "Continue"                },
  242.         { 10, 110,  96, 324}, StaticText    { disabled, "System Error ^0. ^1"    },
  243.         { 47,  20,  64,  80}, StaticText    { disabled, "Error"                    }
  244.     }
  245. };
  246.  
  247. resource 'ALRT' (ALRT_Fatal, "Fatal Error", purgeable) {
  248.     {100, 80, 230, 422},
  249.     ALRT_Fatal,
  250.     {
  251.         OK, visible, silent,
  252.         OK, visible, silent,
  253.         OK, visible, silent,
  254.         OK, visible, silent
  255.     }
  256. };
  257.  
  258. resource 'DITL' (ALRT_Fatal, "Fatal Error", purgeable) {
  259.     {
  260.         {100, 240, 120, 322}, Button        { enabled,    "Exit"                    },
  261.         { 10, 110,  96, 324}, StaticText    { disabled,
  262.                                         "System Error (cannot recover) ^0. ^1"    },
  263.         { 47,  20,  64,  80}, StaticText    { disabled, "Error"                    }
  264.     }
  265. };
  266.  
  267. resource 'SIZE' (-1) {
  268.     reserved,
  269.     acceptSuspendResumeEvents,
  270.     reserved,
  271.     canBackground,
  272.     multiFinderAware,
  273.     backgroundAndForeground,
  274.     dontGetFrontClicks,
  275.     ignoreChildDiedEvents,
  276.     is32BitCompatible,
  277.     notHighLevelEventAware,
  278.     onlyLocalHLEvents,
  279.     notStationeryAware,
  280.     dontUseTextEditServices,
  281.     reserved,
  282.     reserved,
  283.     reserved,
  284.     393216,
  285.     393216
  286. };
  287.  
  288. resource 'BNDL' (128) {
  289.     'MAM1',
  290.     0,
  291.     {
  292.         'FREF',    { 0, 128 },
  293.         'ICN#',    { 0, 128 }
  294.     }
  295. };
  296.  
  297. resource 'FREF' (128) {
  298.     'APPL',
  299.     0,
  300.     ""
  301. };
  302.  
  303.